package chabernac.gravidroid.paint;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;
import chabernac.android.draw.AbstractDrawable;
import chabernac.gravidroid.model.Mass;

public class ForceDrawable extends AbstractDrawable {
    private final Mass myMass;
    private final Paint myPaint;
    
    public ForceDrawable( Mass aMass ) {
        super();
        myMass = aMass;
        myPaint = new Paint();
        myPaint.setColor( Color.YELLOW );
    }

    @Override
    public void paint( Canvas aCanvas, View aView ) {
        aCanvas.drawLine(myMass.location.x, myMass.location.y, myMass.location.x + myMass.force.x / 1000, myMass.location.y
                         + myMass.force.y / 1000, myPaint);

    }

}
